package correct.day12;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Test1 {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String s = br.readLine();
        String t = br.readLine();
        boolean[] hash = new boolean[300];
        for(int i = 0; i < t.length(); i++) {
            hash[t.charAt(i)] = true;
        }
        for(int i = 0; i < s.length(); i++) {
            if(!hash[s.charAt(i)]) {
                System.out.print(s.charAt(i));
            }
        }
    }
}
